'use strict';
const uniID = require('uni-id-common')
exports.main = async (event, context) => {
	const uniIDIns = uniID.createInstance({
		context: context,
	})
	const res = await uniIDIns.checkToken(event.uniIdToken)
	const db = uniCloud.databaseForJQL({
			event,
			context 
		});
	const list=await db.collection("item").where({up:event.up,user_id:res.uid}).orderBy('weight asc, time desc').skip(event.page*20).limit(20).get();
	return {msg:"获取成功",data:list.data}
};
